package com.itboyst.facedemo.controller;

import com.itboyst.facedemo.common.annotation.Log;
import com.itboyst.facedemo.common.core.domain.AjaxResult;
import com.itboyst.facedemo.domain.UserFaceRecord;
import com.itboyst.facedemo.service.UserFaceRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/demo")
public class FaceRecordController  extends BaseController{

    @Autowired
    private UserFaceRecordService userFaceRecordService;

//    //设备提交签到信息
//    @RequestMapping(value = "/record", method = RequestMethod.POST)
//    @ResponseBody
//    public int faceRecord(UserFaceRecord userFaceRecord)
//    {
//        return (userFaceRecordService.insertRecord(userFaceRecord));
//    }

    //设备提交签到信息
    @PostMapping("/record")
    public AjaxResult addrecord(@RequestBody UserFaceRecord userFaceRecord)
    {
        return toAjax(userFaceRecordService.insertRecord(userFaceRecord));

    }

}
